#define _CRT_SECURE_NO_WARNINGS
class Solution {
public:
    string replaceSpace(string s) {
        string ret;
        for (auto ch : s)
        {
            if (ch == ' ')
            {
                ret.push_back('%');
                ret.push_back('2');
                ret.push_back('0');
            }
            else
            {
                ret.push_back(ch);
            }
        }
        return ret;
    }
};